<form id="employeeForm">
<input type="hidden" id="employeeId" name="employee[person_id]" value="{$employee->get_id()}">
<div id="employeeFormHeader" class="form_header" style="margin-top: 5px;">{translate}Employee Information{/translate}</div>

<div id='employeeDetailsInfo' style='border: 1px solid #BBB; padding: 0px 0px;'>
	<div class='field-row add-patient-row'>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Full name{/translate} *</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<input id='name' name="employee[name]" type='text' value="{$employee->get('name')}" style='width: 140px;'/>&nbsp;
		</div>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Gender{/translate} *</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<input type='radio' value='male' name="employee[gender]" id='sex'
				{if $employee->get('gender') == 'male'} checked='checked' {/if}/><span class='label'>{translate}Male{/translate}</span>&nbsp;&nbsp;
			<input type='radio' value='female' name="employee[gender]" id='sex'
				{if $employee->get('gender') == 'female'} checked='checked' {/if}/><span class='label'>{translate}Female{/translate}</span>
		</div>
		<div class='field-label add-patient-label' style='width: 110px;'>{translate}Date of birth{/translate}</div>
		<div class='field-value add-patient-value' style='width: 120px;'>
			<input name='employee[dob_{$datePart_0}]' id='dob_{$datePart_0}' type='text' value="{if $dob.$datePart_0 > 0}{$dob.$datePart_0}{/if}" style='width: 20px;' />
			<input name='employee[dob_{$datePart_1}]' id='dob_{$datePart_1}' type='text' value="{if $dob.$datePart_1 > 0}{$dob.$datePart_1}{/if}" style='width: 20px;' />
			<input name='employee[dob_{$datePart_2}]' id='dob_{$datePart_2}' type='text' value="{if $dob.$datePart_2 > 0}{$dob.$datePart_2}{/if}" style='width: 35px;' />
			<!-- <span class='label' style='color: #AAA; font-weight: normal; font-size: 0.8em;'>({$datePart_0}-{$datePart_1}-{$datePart_2})</span>  -->
		</div>
		<div style='clear: both;'></div>
	</div>
	
	<div class='field-row add-patient-row'>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Alias{/translate}</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<input id='alias' name="employee[alias]" type='text' value="{$employee->get('alias')}" style='width: 140px;'/>&nbsp;
		</div>
		<div style='clear: both;'></div>	
	</div>
	
	<div class='field-row add-patient-row'>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Classify{/translate} *</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<select id='employeeType' name="employee[employee_type_id]" style='width: 145px;'>
				{html_options options=$employeeTypeList selected=$employee->get('employee_type_id')}	
			</select>&nbsp;
		</div>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Department{/translate}</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<select id='department' name="employee[department_id]" style='width: 145px;'>
				{html_options options=$deptList selected=$employee->get('department_id')}	
			</select>&nbsp;
		</div>
		<div class='field-label add-patient-label' style='width: 110px;'>{translate}Diploma{/translate}</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<select id='diploma' name="employee[diploma_id]" style='width: 145px;'>
				<option value='0'>&nbsp;</option>
				{html_options options=$diplomaList selected=$employee->get('diploma_id')}	
			</select>&nbsp;
		</div>
		<div style='clear: both;'></div>
	</div>
	<div class='field-row add-patient-row'>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Contract{/translate}</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<select id='contractType' name="employee[contract_type]" style='width: 145px;'>
				<option value='inside_fund' {if $employee->get('contract_type') == inside_fund}selected='selected'{/if}>{translate}Inside fund{/translate}</option>
				<option value='outside_fund' {if $employee->get('contract_type') == outside_fund}selected='selected'{/if}>{translate}Outside fund{/translate}</option>	
			</select>&nbsp;
		</div>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Email{/translate}</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			<input id='email' name="employee[email]" type='text' style='width: 140px;' value="{$employee->get('email')}" />&nbsp;
		</div>
		<div class='field-label add-patient-label' style='width: 110px;'>{translate}Phone number{/translate}</div>
		<div class='field-value add-patient-value' style='width: 155px;'>
			<input id='phone' name="employee[phone_number]" type='text' style='width: 140px;' value="{$employee->get('phone_number')}" />&nbsp;
		</div>
		<div style='clear: both;'></div>
	</div>
	<div class='field-row add-patient-row'>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Address{/translate}</div>
		<div class='field-value add-patient-value' style='width: 160px;'>
			TODO
		</div>
		<div style='clear: both;'></div>
	</div>
	<div class='field-row add-patient-row' style='height: 45px !important; border-bottom: none;'>
		<div class='field-label add-patient-label' style='width: 80px;'>{translate}Description{/translate}</div>
		<div class='field-value add-patient-value' style='width: 400px; height: 45px !important;'>
			<textarea id='notes' name="employee[notes]" style='width: 400px; height: 40px'>{$employee->get('notes')}</textarea>&nbsp;
		</div>
		<div style='clear: both;'></div>
	</div>
</div>
</form>
<div id='employeeFormBtn' style='margin-top: 10px; text-align: right;'>
	{if $employee->get('person_id') > 0}
	<input type='button' value="{translate}Update{/translate}" onclick="editEmployee()">	
	{else}
	<input type='button' value="{translate}Create new{/translate}" onclick="editEmployee()">	
	{/if}
</div>